<?php
class sys_operation_log_model extends CI_Model {

	public function __construct(){
		parent::__construct();
		$this->db = $this->load->database('default',true);
	}

	public function insert_log($log_info){
		$this->db->insert("sys_operation_log",$log_info);
	}
	public function get_logs($unique_id){
		$sql ="select * from sys_operation_log where unique_id='$unique_id'";
		$query =$this->db->query($sql);
		if ($query) {
			return $query->result_array();
		}
	}
	
	public function delete_log($unique_id){
		$sql ="delete from sys_operation_log where unique_id='$unique_id'";
		$this->db->query($sql);
	}
}